#!/bin/bash -e

function info() {
echo Usage: `basename $0`
exit 65
}

while getopts  ":p:f:" opts
do
        case  $opts  in
		p) out_prefix=$OPTARG;;
		f) suffix=$OPTARG;;
		*) info;;
        esac
done
shift $(($OPTIND - 1))


# if [ $# -lt 1 ]; then info; fi

. $var


fq_index=0
for fq in $(ls $out_prefix.1.split.00*); do
	fq_index=$(($fq_index+1))
	ln -s $fq $out_prefix.1.split.$fq_index.fastq
done

fq_index=0
for fq in $(ls $out_prefix.2.split.00*); do
	fq_index=$(($fq_index+1))
	ln -s $fq $out_prefix.2.split.$fq_index.fastq
done


. $cmd_done
